﻿using System;
using LJLib.Net.SPI.Com;
using System.Collections.Generic;
using DirectService.Server.Com.ROS.Model;

namespace DirectService.Server.Com.ROS
{
    /// <summary>
    /// 协同系统客户端登陆
    /// </summary>
    public sealed class LoginRequest : ILJRequest<LoginResponse>
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string usercode { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string psw { get; set; }
        public string GetApiName()
        {
            return "Login";
        }
    }

    /// <summary>
    /// 登录失败,ErrMsg返回错误信息
    /// </summary>
    public sealed class LoginResponse : LJResponse
    {
        /// <summary>
        /// 会话ID，记录会话ID后续接口需要用到
        /// </summary>
        public string token { get; set; }
        public string username { get; set; }
        public string usertele { get; set; }
        public string address { get; set; }
        public string freight { get; set; }
        public string freight_tele { get; set; }
        public string comname { get; set; }
        public string comtele { get; set; }
        public int usertype { get; set; }
        public int interval { get; set; }
        public string fx_title_erp { get; set; }
        [Obsolete("参数已停用")]
        public string relcode { get; set; }
        [Obsolete("参数已停用")]
        public int relationtype { get; set; }
        public List<FxUserPower> PwrList { get; set; }
        public string statusname { get; set; }
        public string woodcodename { get; set; }
        public string pcodename { get; set; }
        public string spttele { get; set; }
        public string erpOutrepName { get; set; }//(客户协同用)对应ERP工厂的业务员
        public string erpOutrepTele { get; set; }//(客户协同用)业务员电话
        public string erpOutrepTele1 { get; set; }//(客户协同用)业务员手机
        public string logoUrl { get; set; } //工厂logo链接地址
        public string dscrp { get; set; } //工厂简介
		public bool ifERPUser { get; set; } //是否ERP工厂所属用户
        public int userid { get; set; }//分销用户id，唯一，用于单推
    }
}
